qui(
    function (require, exports, module) {
        VOD.Action = (function () {
            var editForm = null;
            var newsEditForm = null;
           // var editMergeForm = null;

            function initWindowEvent(){
                window.onbeforeunload = function () {
                    var warning = "确认要重新打点吗？";
                    return warning;
                }
                $(window).unbind("keydown").bind("keydown", function (e) {
                    VOD.Util.globalEvent(e);
                });
                window.onresize = function () {
                    VOD.Util.browserZoomTips();
                    VOD.Util.LayoutInit();
                    VOD.Util.doNewsGridResize();
                };
            }

            var editRun = function () {
                if(editForm == null){
                    editForm = new VOD.Edit($.extend(true, {
                        $FrameGrid:$('#frame_list'),
                        $AdvertGrid:$('#advert_list')
                        // '$form': $('form[role=form]')
                    }, {}));
                    setTimeout(function () {
                        $("body footer").hide();
                        console.log("隐藏footer");
                    },1000)
                    editForm.init();
                    initWindowEvent();
                }
                console.log(' editRun ');
            }
            var newsEditRun = function () {
                if(newsEditForm == null){
                    newsEditForm = new VOD.NewsEdit($.extend(true, {
                        $FrameGrid:$('#frame_list'),
                        $AdvertGrid:$('#advert_list'),
                        $NewsGrid:$('#news_list')
                        // '$form': $('form[role=form]')
                    }, {}));
                    setTimeout(function () {
                        $("body footer").hide();
                        console.log("隐藏footer");
                    },2000)
                    newsEditForm.newsInit();
                    initWindowEvent();
                }
                console.log(' editRun ');
            }

//            var editMergeRun = function(){
//                if(editMergeForm == null){
//                    editMergeForm = new VOD.EditMerge($.extend(true, {
//                        $FrameGrid:$('#frame_list'),
//                        $AdvertGrid:$('#advert_list'),
//                        $NewsGrid:$('#news_list')
//                        // '$form': $('form[role=form]')
//                    }, {}));
//                    setTimeout(function () {
//                        $("body footer").hide();
//                        console.log("隐藏footer");
//                    },2000)
//                    editMergeForm.init();
//                    initWindowEvent();
//                }
//
//            }
            return {
                editRun: editRun,
                newsEditRun:newsEditRun
           //     editMergeRun:editMergeRun
            }
        })();
    }
);